//
//  GestureView.h
//  Playground
//
//  Created by Basuke on 08/03/24.
//  Copyright 2008 Basuke's. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface MoreTouchInfo : NSObject {
	UITouch *touch;
}

@property(assign) UITouch *touch;

@end

@class GestureView;

@protocol GestureViewDelegate <NSObject>
@optional

- (void)gestureView:(GestureView*)view touchBegan:(UITouch *)touch;
- (void)gestureView:(GestureView*)view touchMoved:(UITouch *)touch;
- (void)gestureView:(GestureView*)view touchEnded:(UITouch *)touch;
- (void)gestureView:(GestureView*)view touchCanceled:(UITouch *)touch;

- (void)gestureViewEventCanceled:(GestureView*)view;

- (void)gestureView:(GestureView*)view tappedAt:(CGPoint)location;
- (void)gestureView:(GestureView*)view tappedAt:(CGPoint)location count:(NSUInteger)tapCount;

@end

@interface GestureView : UIView {
	id<GestureViewDelegate>		_delegate;
	NSUInteger					_delegateMethods;
	BOOL						_gestureStarted;
	BOOL						_touchMoved;
	UITouch						*_handlingSingleTouch;
	NSTimeInterval				_firstTouchAt;
	NSMutableDictionary			*_currentTouches;
}

@property(assign) id<GestureViewDelegate> delegate;

@end
